import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.geom.Rectangle;
import flash.geom.Point;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.display.Sprite;
import flash.ui.Keyboard;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.filters.GlowFilter;


import flash.utils.Timer;
import haxe.Timer;
import flash.events.Event;


import Images;  
import Blob;

class EnemyCharacter extends Character
{
public var stand : Blob; 
public var standLeft : Blob;
public var move1 : Blob;
public var move2 : Blob;
public var move3 : Blob;
public var move1_left : Blob;
public var move2_left : Blob;
public var move3_left : Blob;
public var shoot : Blob;
public var attackRight : Blob;
public var attackLeft : Blob;
public var attackDown : Blob;


public function new(inPostion:Point,inMoveSpeed:Int,inJumpSpeed:Int,inAttackSpeed:Int,inHealth:Int,inAttackPower:Int)
  {
   super(inPostion,inMoveSpeed,inJumpSpeed,inAttackSpeed,inHealth,inAttackPower);
   stand = new Blob(new ZombieStand(),0,0,46,52,null,null);
    CurrentCharacter  = stand;
    standLeft = new Blob(new ZombieStandLeft(),0,0,46,52,null,null);
    attackRight = new Blob(new Attack(),0,0,46,40,null,null);
    attackLeft = new Blob(new AttackLeft(),0,0,46,40,null,null);
    attackDown = new Blob(new AttackDown(),0,0,40,46,null,null);
  attack = attackRight;
  characterType = "Enemy";
    
  }

public override function getAttack(mKeyDown:Array<Bool>)
{
//   if (mKeyDown[ Keyboard.SPACE ])
//   {
//     if(attacking > 0)
//       {return;}
//     if(jumping > 0)
//     {
//       attacking = 1;
//       attackPostion = new Point(postion.x,postion.y+CurrentCharacter.mRect.height);
//       attack = attackDown;
//     }
//     else if(movingRight)
//     {
//       attacking = 1;
//       attackPostion = new Point(postion.x+CurrentCharacter.mRect.width,postion.y);
//       attack = attackRight;
//     }
//     else
//     {
//       attacking = 1;
//       attackPostion = new Point(postion.x-CurrentCharacter.mRect.width,postion.y);
//       attack = attackLeft;
//     }
//   }
}

public override function getCharacter(mKeyDown:Array<Bool>)
{

    moving = 0;
    if(movingRight)
      {
      CurrentCharacter = stand;
      }
    else
      {
      CurrentCharacter = standLeft;
      }
	
}

}